<template>
	<view>
		<z-nav-bar>老师评价</z-nav-bar>
		<!-- 公共组件-每个页面必须引入 -->
		<!--<public-module></public-module>-->
		<view class="title">
			<image class="title-picture" src="@/static/user-img.png" mode=""></image>
			<text class="title-name">张老师</text>
			<text class="title-position">班主任</text>
		</view>
		<view class="list">
			<view class="classCard">
				<view class="header">
					<text>教务态度</text>
				</view>
				<view class="list-row">
					<view class="row">
						<text>1.你认为该教务班主任对您们的态度如何？</text>
					</view>
					<view class="uni-list">
						<radio-group class="radio-group" @change="radioChange(0)">
							<label :style="index + 1 < items.length ? 'margin-right: 15px;' : ''" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
								<radio style="transform:scale(0.65)" :value="item.value" :checked="index === current" /><text class="radio-name">{{item.name}}</text>
							</label>
						</radio-group>
					</view>
				</view>
				<view class="list-row">
					<view class="row">
						<text>1.你认为该教务班主任对您们的态度如何？</text>
					</view>
					<view class="uni-list">
						<radio-group class="radio-group" @change="radioChange(1)">
							<label :style="index + 1 < items.length ? 'margin-right: 15px;' : ''" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
								<radio style="transform:scale(0.65)" :value="item.value" :checked="index === current" /><text class="radio-name">{{item.name}}</text>
							</label>
						</radio-group>
					</view>
				</view>
			</view>
			<view class="classCard">
				<view class="header">
					<text>教学能力</text>
				</view>
				<view class="list-row">
					<view class="row">
						<text>1.你认为该教务班主任对您们的态度如何？</text>
					</view>
					<view class="uni-list">
						<radio-group class="radio-group" @change="radioChange(2)">
							<label :style="index + 1 < items.length ? 'margin-right: 15px;' : ''" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
								<radio style="transform:scale(0.65)" :value="item.value" :checked="index === current" /><text class="radio-name">{{item.name}}</text>
							</label>
						</radio-group>
					</view>
				</view>
				<view class="list-row">
					<view class="row">
						<text>1.你认为该教务班主任对您们的态度如何？</text>
					</view>
					<view class="uni-list">
						<radio-group class="radio-group" @change="radioChange(3)">
							<label :style="index + 1 < items.length ? 'margin-right: 15px;' : ''" class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
								<radio style="transform:scale(0.65)" :value="item.value" :checked="index === current" /><text class="radio-name">{{item.name}}</text>
							</label>
						</radio-group>
					</view>
				</view>
			</view>
			<view class="classCard">
				<view class="header">
					<text>评分合计</text><text class="sum-text">99</text>
				</view>
				<view class="list-row" style="margin-top: 28px;">
					<view class="row">
						<textarea class="reason" v-model="txt" maxlength="100" placeholder="请输入"/>
					</view>
				</view>
			</view>
		</view>
		<button type="primary" class="btn" @click="submitForm">提交</button>
	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				checked: false,
				radio: 1,
				noticeText: '当前班别剩余选班次数2次',
				items: [{
						value: '10',
						name: '好(10)'
					},
					{
						value: '8',
						name: '较好(8)',
						checked: 'true'
					},
					{
						value: '6',
						name: '中(6)'
					},
					{
						value: '3',
						name: '差(3)'
					}
				],
			};
		},
		computed: {

		},
		onLoad(e) {

		},
		onShow() {

		},
		//方法
		methods: {
			submitForm() {
				uni.showModal({
					title: '提交评价',
					content: '提交之后无法修改',
					cancelText: "取消", // 取消按钮的文字  
					confirmText: '我再想想',
					confirmColor: '#000000',
					cancelColor: '#81B435',
					success: (res) => {
						this.checked = !this.checked
					}
				});
			},
			appraise(flag) {
				flag && uni.showModal({
					title: '提示',
					content: '请于4月20日之后再来评价哦~',
					confirmText: '知道了',
					showCancel: false,
					cancelColor: '#81B435',
					success: (res) => {
						this.checked = !this.checked
					}
				});
				flag || uni.navigateTo({
					url: '/subpages/my/evaluate/appraise'
				});
			},
			radioChange() {
				this.checked = !this.checked
			},
			onPageJump(url) {
				uni.navigateTo({
					url: url
				});
			},
		},
		//页面下来刷新
		onPullDownRefresh() {},
		//页面上拉触底
		onReachBottom() {},
		//用户点击分享
		onShareAppMessage(e) {
			return this.wxShare();
		}
	};
</script>
<style lang="scss">
	@import '@/style/mixin.scss';

	page {
		background-color: $uni-bg-color-grey;
	}

	.blue-box {
		height: 150vh;
		background-color: red;
	}
	.list {
	}
	.classCard {
		margin: 16px auto;
		width: 686upx;
		padding: 16px;
		background: #FEFFFF;
		border-radius: 16px;
		position: relative;
		&::before {
			content: "";
			width: 32px;
			height: 3px;
			background: #F5F5F5;
			background-size: 100%;
			position: absolute;
			top: 49px;
			left: 18px;
		}
		.tip {
			height: 32px;
			width: 78px;
			text-align: center;
			position: absolute;
			background: #81B435;
			background-color: rgba(129, 180, 53, 0.1);
			right: 25px;
			top: 0;
			border-radius: 0px 0px 16px 16px;
			font-family: PingFangSC;
			font-size: 15px;
			line-height: 30px;
			color: #81B435;
		}
		.tip-bohui {
			color: #EB5757;
			background-color: rgba(235, 87, 87, 0.1);
		}
		.tip-shenhezhong {
			color: #F2994A;
			background-color: rgba(242, 153, 74, 0.1);
		}
		.tip-tongguo {
			color: #81B435;
			background-color: rgba(129, 180, 53, 0.1);
		}
		.header {
			height: 17px;
			line-height: 17px;
			font-family: PingFangSC;
			font-size: 17px;
			color: #323233;
			.personNum {
				text-align: center;
				font-size: 11px;
				line-height: 11px;
				color: #FFFFFF;
				background: #81B435;
				padding: 2px 10px;
				border-radius: 11px;
			}
		}
		.list-row {
			margin-top: 23px;
			.radio-name {
				font-size: 14px;
				line-height: 20px;
				color: #323233;
			}
		}
		.row {
			color: #969696;
			font-size: 15px;
			line-height: 30px;

			text {
				margin-right: 20px
			}
			.value {
				font-family: PingFangSC;
				font-size: 15px;
				line-height: 30px;
				color: #4F4F4F;
			}
		}
	}
	.btn {
		background-color: $uni-theme-color;
		border-radius: 30px;
		margin: 33px 16px 100px;
	}
	.positon-box {
		padding: 8px 0;
		.position-title {
			background: rgba(129, 180, 53, 0.1);
			border-radius: 2px;
			height: 20px;
			line-height: 20px;
			padding: 0 16px;
			color: #81B435;
			font-size: 12px;
			margin-right: 7px;
			display: inline-block;
		}
		.position-value {
			font-family: Source Han Sans CN;
			font-style: normal;
			font-weight: normal;
			font-size: 14px;
			line-height: 20px;
			height: 20px;
			color: #000000;
			display: inline-block;
		}
		.number {
			display: inline-block;
			float: right;
			position: relative;
			font-size: 15px;
			line-height: 20px;
			color: #81B435;
		}
	}
	.title {
		margin: 16px auto;
		width: 686upx;
		background: #FEFFFF;
		border-radius: 16px;
		position: relative;
		height: 88px;
		line-height: 88px;
		.title-picture {
			width: 51px;
			height: 51px;
			border-radius: 50%;
			margin-left: 16px;
			margin-right: 10px;
			display: inline-block;
			position: relative;
			top: 18px;
		}
		.title-name {
			font-weight: bold;
			font-size: 17px;
			color: #000000;
		}
		.title-position {
			background: rgba(129, 180, 53, 0.1);
			border-radius: 2px;
			height: 16px;
			line-height: 16px;
			padding: 0 9px;
			color: #81B435;
			font-size: 12px;
			margin-left: 8px;
			display: inline-block;
		}
	}
	.reason {
		background: #F7F8FA;
		width: 100%;
		padding: 10px;
		margin-top: 13px;
		height: 96px;
	}
	.sum-text {
		font-size: 27px;
		line-height: 32px;
		color: #81B435;
		margin-left: 19px;
		position: absolute;
		top: 9px;
	}
</style>
